package logic

import (
	"context"
	"fmt"

	"rpcjwt/api/internal/svc"

	"github.com/zeromicro/go-zero/core/logx"
)

type CstestLogic struct {
	logx.Logger
	ctx    context.Context
	svcCtx *svc.ServiceContext
}

func NewCstestLogic(ctx context.Context, svcCtx *svc.ServiceContext) *CstestLogic {
	return &CstestLogic{
		Logger: logx.WithContext(ctx),
		ctx:    ctx,
		svcCtx: svcCtx,
	}
}

func (l *CstestLogic) Cstest() error {
	// todo: add your logic here and delete this line
	value := l.ctx.Value("userid")
	fmt.Println("打印userid", value)
	return nil
}
